<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>众通社云推广后台</title>
	<link rel="stylesheet" type="text/css" href="/Public/admin/css/style.css">
</head>
<body>
	<div class="content p50">
		<form action="/Admin/User/userList.html">
		<div class="content-title">
			<h2>用户列表</h2>
			<div class="content-right">
				<span class="search-title">用户名：</span>
				<span class="search fl"><input type="text" name="secuname" placeholder="请输入" value="<?php echo ($_GET['secuname']); ?>"></span>
				<input type="submit" class="search-btn fl" value="">
			</div>
		</div>
		</form>
		<div class="p20">
			<table class="table">
				<thead>
					<tr>
						<th>序号</th>
						<th>用户名</th>						
						<th>性别</th>
						<th>手机号码</th>
						<th>添加时间</th>
						<th>账号余额</th>
						<th>是否启用</th>
						<th>最后登录IP</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<?php if(is_array($userList)): $i = 0; $__LIST__ = $userList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
						<td><?php echo ($key+1); ?></td>
						<td><?php echo ($vo["username"]); ?></td>
						<td><?php echo $vo["sex"]==1?"男":"女"; ?></td>
						<td><?php echo ($vo["phone"]); ?></td>
						<td><?php echo ($vo["reg_time"]); ?></td>
						<td><?php echo ($vo["money"]); ?></td>
						<td><?php echo $vo["is_apply"]==1?"是":"否"; ?></td>
						<td><?php echo ((isset($vo["last_ip"]) && ($vo["last_ip"] !== ""))?($vo["last_ip"]):'--'); ?></td>						
						<td><a href="javascript:" class="del_user" data-id="<?php echo ($vo["id"]); ?>">删除</a>|<a href="<?php echo U('User/updUser',array('id'=>$vo['id']));?>">修改</a></td>
					</tr><?php endforeach; endif; else: echo "" ;endif; ?>
				</tbody>
			</table>
			<div class="page"><?php echo ($page); ?></div>
		</div>
	</div>
	<div class="layer-box">
		<div class="layer-gray">
			<div class="text"></div>
		</div>
	</div>
	<div class="layer-box">
	<div class="layer">
		<div class="shut fr"><img src="/Public/images/close.png"></div>
		<div class="text">alert</div>
		<div class="btn"><a href="#" class="confirm">确定</a><a href="#" class="close">取消</a></div>
	</div>
</div>
	<script type="text/javascript" src="/Public/js/jquery-1.7.min.js"></script>
	<script type="text/javascript" src="/Public/admin/js/page.js"></script>
	<script type="text/javascript">
		//删除（批量ids删除用英文逗号隔开）
		$(".del_user").click(function(){

			var _this=$(this);

			modelConfirm("确定要删除吗",function(){

				var ids=_this.attr("data-id");
				if(!ids){
					prompting("删除失败，请刷新后重试");
					return false;
				}
				$.post("/Admin/User/ajaxDelUser",{"ids":ids},function(data){
					prompting(data.info);
					_this.parent().parent().remove();	
				});
			});
		});
	</script>
</body>
</html>